package com.ebo.httpcall4j.core;


import com.ebo.httpcall4j.core.model.HttpCallRequest;
import com.ebo.httpcall4j.core.model.HttpCallResponse;
import com.ebo.httpcall4j.core.processor.HttpCallProcessor;

import java.io.IOException;
import java.util.concurrent.CompletableFuture;

/**
 * http调用核心服务
 */
public interface HttpCallService {

    HttpCallResponse call(HttpCallRequest request, Class<?  extends HttpCallProcessor> processorClass) throws IOException;

    CompletableFuture<HttpCallResponse> callAsync(HttpCallRequest request, Class<? extends HttpCallProcessor> processorClass);
}